package apiday02home;

public class IntegerHome {
    public static void main(String[] args) {
        Integer i=5;//装箱
        int j=i;//拆箱

        int max=Integer.MAX_VALUE;
        int min=Integer.MIN_VALUE;
        System.out.println("int的最大值是："+max+",int的最小值是："+min);

        String s1 = "21";
        int age = Integer.parseInt(s1);//将字符串类型转换为int类型并赋值给age
        System.out.println(age);//39---int类型
        String s2 = "123.45";
        double price = Double.parseDouble(s2);//将字符串类型转换为double类型并赋值给price
        System.out.println(price);//123.45---double类型
    }
}
